﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ctlContactFace.ascx.cs" Inherits="Ctl_ctlContactFace" %>
<div style = "width:100%;" class ="EditRowBackGround"  > 
<table width ="100%" cellpadding ="2px" cellspacing ="0">            
            <tr >
             <td   style ="width :50px; vertical-align :top" >                            
                   <asp:ImageButton ID="ImageButton2"  CommandName ="Update" runat="server" 
                       ImageUrl="~/images/grd_minus.gif"  />
                </td>      
                    
            <td  style ="width :30%" class ="grd_td_item" >
                <asp:HiddenField ID=hfContactFaceId Value=<%# Bind("ID") %> runat="server" />
                Фамилия:
            </td>
            <td style ="width :30%" class ="grd_td_item" >
                <asp:TextBox ID=txtFirstName Text =<%# (string)Eval("FirstName") %> CssClass="TextBox" runat="server"></asp:TextBox>
            </td>
                        
            <td  class ="grd_td_item" style ="vertical-align:top; text-align :right "    rowspan="4" >             
             
             <table width="100%" cellpadding ="0px" cellspacing ="0" >
            <tr>            
            <td style ="text-align :center"   >
                
                <asp:Label ID=Label4 runat="server" Font-Bold ="true"  Text="Контакты"></asp:Label>
            </td>
            <td   style ="width :25px; height :15px" >
                &nbsp
            </td>
            </tr>
             <asp:ListView ID="lvContactItems" runat="server" 
                onitemcommand="ItemCommand" onitemediting="ItemEditing">
            <LayoutTemplate>            
            <tr runat="server" id="itemPlaceholder" >
            </tr>  
            </LayoutTemplate>
            <ItemTemplate >
            <tr >            
            <td style ="text-align :center;height :15px ">
                <%# (string) Eval ("ContactValue")  %>
            </td>
            <td style ="width :15px; text-align :right"  >
                <asp:ImageButton ID=btnRemoveContactItem OnClientClick ="OnDeleteClick();" OnClick ="btnRemoveContactItem_Click" CommandArgument =<%# (string)Eval("ID") %> ImageUrl ="~/images/trash.png" runat="server" />
            </td>
            </tr>
            </ItemTemplate>            
            <EditItemTemplate >
                <tr >            
            <td style ="text-align :center;height :15px ">
                <asp:TextBox ID=txtContactValue CssClass ="TextBox"  runat="server"></asp:TextBox>
            </td>
            <td style ="width :15px" >
                <asp:ImageButton ID=ImageButton3 ImageUrl ="~/images/icon-save.gif" runat="server" />
            </td>
            </tr>
            </EditItemTemplate>            
            </asp:ListView>
            </table>
            
            </td>
            
            </tr>
            <tr >
             <td   style ="width :50px" >                            
                   &nbsp;</td>      
                
            <td  style ="width :30%" class ="grd_td_item" >
                Имя:
            </td>
            <td style ="width :30%" class ="grd_td_item" >
                <asp:TextBox ID=txtSecondName Text =<%# (string)Eval("SecondName") %> CssClass="TextBox" runat="server"></asp:TextBox>
            </td>
                        
            </tr>
            <tr >
             <td   style ="width :50px" >                            
                   &nbsp;</td>      
                
            <td  style ="width :30%" class ="grd_td_item" >
                Отчество:</td>
            <td style ="width :30%" class ="grd_td_item" >
                <asp:TextBox ID=txtLastName Text =<%# (string)Eval("LastName") %>  CssClass="TextBox" runat="server"></asp:TextBox>
            </td>
                        
            </tr>
            <tr >
                <td   style ="width :50px" >                            
                   &nbsp;</td>      
                
            <td  style ="width :30%" class ="grd_td_item" >
                Должность:</td>
            <td style ="width :30%" class ="grd_td_item" >
                <asp:TextBox ID=txtPosition  Text =<%# (string)Eval("Position") %> CssClass="TextBox" runat="server"></asp:TextBox>
            </td>
                        
            </tr>                                  
            <tr >
                <td   style ="width :50px" >                            
                    &nbsp;</td>      
                
            <td  style ="width :30%"  class ="grd_td_item "  >
                Новый контакт:</td>
            <td style ="width :30%" class ="grd_td_item "   >
                
                <asp:TextBox ID=txtContactValue   
                    CssClass="TextBox" runat="server"></asp:TextBox>
                
            </td>
            <td  class ="grd_td_item "  >
                <table cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td class ="menuSplit" >
                            <asp:RadioButtonList ID=rbContactType runat="server" 
                                RepeatDirection="Horizontal">
                            <asp:ListItem Selected =True Text ="Тел." Value ="490A1955-995D-4984-A22B-24DF3AC5B5EB" ></asp:ListItem>
                            <asp:ListItem  Text ="eMail" Value ="AB2DBDAA-352B-467D-8B51-0B4C57E3D08F" ></asp:ListItem>
                            <asp:ListItem  Text ="Адрес" Value ="E37D5E04-CA19-421D-A729-8FE640E1AA57" ></asp:ListItem>
                            <asp:ListItem  Text ="URL" Value="6939D823-0A4C-47FC-BF3E-6EABF48C15C5" ></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        <td >
                            <asp:CheckBox ID=chMainContact Checked ="true"  runat="server" Text="Осн." />
                        </td>
                        <td style="width :25px">
                            <asp:ImageButton ID="ImageButton5" OnClick ="btnAddContactItem_Click" runat="server"  ImageUrl="~/images/add.png" />
                        </td>
                    </tr>
                </table></td>       
            </tr>          
            <tr >
                <td   style ="width :50px" >                            
                    &nbsp;</td>      
                
            <td  style ="width :30%"   >
                Клиент:</td>
            <td  colspan="2"   >
                
                <asp:Label ID="Label5" runat="server" Font-Bold="False" Text=<%# ClientName %> 
                    ForeColor="#6666FF"></asp:Label>
                </td>
            </tr>  
            <tr >
                <td   style ="width :50px" >                            
                   &nbsp;</td>      
                
            <td  style ="width :30%"  >
            &nbsp
            </td>
            <td style ="width :30%"  >
                
            </td>
            <td  style="text-align :right" >
                <asp:Button ID=Button2 runat ="server"  CssClass ="btn_wizard" Text ="Сохранить"  OnClick ="btnSaveWorker_Click"  />
            </td>       
            </tr>
     </table>
</div>